﻿@model IEnumerable<KhuyenMaiVang.DAL.Address>

@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}

@section heading{Danh sách địa chỉ}

<p>
    @Html.ActionLink("Thêm địa chỉ", "Create")
</p>
<table>
    <thead>
    <tr>
        <th>
            Địa chỉ
        </th>
        <th>
            Latitude
        </th>
        <th>
            Longitude
        </th>
        <th>
            Doanh nghiệp
        </th>
        <th></th>
    </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Latitude)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Longitude)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Business.MangerName)
        </td>
        <td>
            @Html.ImageLink("Edit", Url.Content("~/Content/areas/admin/resources/images/icons/pencil.png"), "Sửa", new{id=item.ID})
            @Html.ImageLink("Delete", Url.Content("~/Content/areas/admin/resources/images/icons/cross.png"), "Xóa", new{id=item.ID})
        </td>
    </tr>
}
</tbody>
</table>
